import Mock from "mockjs";

// 配置拦截 ajax 的请求时的行为，支持的配置项目有 timeout。
Mock.setup({
  // 响应时间
  timeout: "200 - 1000"
});
Mock.mock("mock/user/userInfo.xhtml", "get", {
  code: 200,
  status: true,
  data: {
    fullName: "@CNAME", // 随机生成中文人名
    userId: 1000234234001,
    username: "zhangsan"
  },
  msg: "success"
});
Mock.mock("mock/user/customerList.xhtml", "post", {
  code: 200,
  status: true,
  data: [
    {
      fullName: "@CNAME", // 随机生成中文人名
      userId: 1000234234001,
      username: "zhangsan"
    },
    {
      fullName: "@CNAME", // 随机生成中文人名
      userId: 1000234234002,
      username: "lisi"
    },
    {
      fullName: "@CNAME", // 随机生成中文人名
      userId: 1000234234003,
      username: "wangwu"
    }
  ],
  msg: "success"
});
